<template>
  <MenuNavigation />
  <div
    ref="exhibits16"
    class="jy-style-height cultural-box"
    id="exhibits-box-id"
    :style="{
      backgroundImage: `url(${publicUrls + 'free/style14/style14publicBg.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="back-btn" @click="blankHome">
      <img :src="publicUrls + 'free/style14/style14BackIcon.png?imageView2/3/format/webp'" alt="" />
    </div>

    <div class="content-box">
      <div
        class="public-name"
        :style="{
          backgroundImage: `url(${publicUrls + 'free/style14/publicTitleBg.png' + '?imageView2/3/format/webp'})`,
        }"
      >
        <img :src="publicUrls + 'free/style14/publicName3.png?imageView2/3/format/webp'" alt="" />
      </div>
      <ScrollBox
        color="rgba(50, 43, 37, 1)"
        v-if="Scrollheights"
        :remarks="commonStore.copyrightInfo"
        :byid="234"
        :height="getScrollWComputed"
        :scroll-src="publicUrls + 'free/style14/scrollIcon.png'"
      >
        <!-- 滚动条 -->
        <template #solidBorder>
          <div class="solidBorder-child"></div>
        </template>
      </ScrollBox>
    </div>
    <div class="content-door">
      <i class="iconfonts">&#xe6dd;</i>
      <span>永不落幕的展览与展示平台</span>
    </div>
  </div>
</template>

<script lang="ts">
export default defineComponent({
  name: 'style14',
});
</script>
<script lang="ts" setup>
import { publicUrls, doorUrl } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { defineComponent, nextTick, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const commonStore = commonDataStore();
const store = useProjectStore();
const router = useRouter();
const route = useRoute();
const content = ref(null);
const Scrollheights = ref();

let viewportHeight = window.innerHeight;
Scrollheights.value = viewportHeight * 0.4;
const getScrollWComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 460;
  return heights;
});
const getTabmComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 98;
  return heights;
});
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
</script>

<style lang="less" scoped>
.cultural-box {
  position: relative;
  width: 100%;
  height: 100%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 116px 80px 58px 80px;
}
.content-door {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  cursor: pointer;
  .iconfonts {
    font-size: 26px;
    color: #fff;
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: #fff;
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
.back-btn {
  position: absolute;
  top: 60px;
  left: 80px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
.content-box {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 80px 120px 80px 120px;
}
.public-name {
  position: absolute;
  top: -66px;
  left: 50%;
  transform: translateX(-50%);
  width: 370px;
  height: 116px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
  img {
    width: 142px;
    height: 34px;
    flex-shrink: 0;
    object-fit: fill;
  }
}
::v-deep .unit-exbit-null-remarks-info {
  width: 100%;
  min-height: 100% !important;
}
::v-deep .unit-exbi-remarks-info-remarks {
  width: 100%;
  max-height: 100% !important;
  p {
    color: #fff;
    text-align: justify;
    font-family: 'Microsoft YaHei';
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 200%; /* 32px */
  }
}
::v-deep .solid-box-parent {
  position: absolute;
  top: 50%;
  right: -60px;
  transform: translateY(-50%);
  .templatestyle1-scroll-box-tumb {
    justify-content: center;
  }
  img {
    width: 18px;
    height: 18px;
    margin-top: 2px;
  }
}
.solidBorder-child {
  width: 2px;
  height: 460px;
  background: #19326d;
}
</style>
